package com.bh.kysys.mapper;

import com.bh.kysys.domain.JcSysUserOrganization;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * organizationMapper接口
 * 
 * @author slx
 * @date 2023-03-11
 */
@Mapper
public interface JcSysUserOrganizationMapper
{

    /**
     * 查询organization列表
     * 
     * @param jcSysUserOrganization organization
     * @return organization集合
     */
    public List<JcSysUserOrganization> selectJcSysUserOrganizationList(JcSysUserOrganization jcSysUserOrganization);

    /**
     * 查询organization列表
     * @param userId
     * @return
     */
    public List<JcSysUserOrganization> selectJcSysUserOrganizationListByUserId(Long userId);

    /**
     * 查询organization列表
     * @param orgId
     * @return
     */
    public List<JcSysUserOrganization> selectJcSysUserOrganizationByOrgId(Long orgId);


    public JcSysUserOrganization selectJcSysUserOrganizationByUserIdAndOrgId(@Param("userId")Long userId, @Param("orgId") Long orgId);


    /**
     * 
     * @param userOrganizations
     * @return
     */
    public int saveBatch(List<JcSysUserOrganization> userOrganizations);

    /**
     * 删除
     * @param userId
     * @return
     */

    public int deleteJcSysUserOrganizationByUserId(Long userId);

    /**
     * 删除
     * @param userOrganization
     * @return
     */
    public int deleteJcSysUserOrganization(JcSysUserOrganization userOrganization);
}
